/******************************************************************************
*  Nano-RK, a real-time operating system for sensor networks.
*  Copyright (C) 2007, Real-Time and Multimedia Lab, Carnegie Mellon University
*  All rights reserved.
*
*  This is the Open Source Version of Nano-RK included as part of a Dual
*  Licensing Model. If you are unsure which license to use please refer to:
*  http://www.nanork.org/nano-RK/wiki/Licensing
*
*  This program is free software: you can redistribute it and/or modify
*  it under the terms of the GNU General Public License as published by
*  the Free Software Foundation, version 2.0 of the License.
*
*  This program is distributed in the hope that it will be useful,
*  but WITHOUT ANY WARRANTY; without even the implied warranty of
*  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
*  GNU General Public License for more details.
*
*  You should have received a copy of the GNU General Public License
*  along with this program.  If not, see <http://www.gnu.org/licenses/>.
*
*  Contributing Authors (specific to this file):
*  Aditya Bhave
*******************************************************************************/

/* This file should be edited by the user depneding on his application */

#ifndef _NW_STACK_CONFIG_H
#define _NW_STACK_CONFIG_H

#include "NWErrorCodes.h"

// configurable parameters for the buffer manager 
#define MAX_APP_PAYLOAD  40  					// maximum size of the application payload in bytes 
#define MAX_SERIAL_PAYLOAD 32  					// maximum size of serial data payload
#define MAX_GATEWAY_PAYLOAD 40 				// payload size from gateway to node
#define MAX_RX_QUEUE_SIZE 8 					// maximum number of receive buffers available in the 
														// system for USER tasks 
#define MAX_TX_QUEUE_SIZE 4     				// maximum size of transmit queue for the system
#define DEFAULT_EXCESS_POLICY DROP 			// excess policy default


// configurable parameters for the transport layer 
#define NUM_PORTS 4 								// number of ports available on the node  

// configurable parameters for the network layer  
#define CONNECTED_TO_GATEWAY TRUE	// indicates whether this node connects to the gateway or not
#define MAX_NGBS 5						// maximum number of neighbors recorded
#define HELLO_PERIOD 2  				// every HELLO_PERIOD seconds, a HELLO msg will be sent
#define MAX_NETWORK_DIAMETER 20		// maximum number of hops to the gateway
#define NGB_LIST_PERIOD 6 				// every NGB_LIST_PERIOD seconds, a NGB_LIST msg will be sent
#define TIMEOUT_COUNTER	5				// Each node has to report to it's neighbor within this count
#define MAX_NODES 5 				// maximum number of nodes in a sensor subnet

// priority levels of messages 
#define MAX_PRIORITY 31
#define LOW_PRIORITY 1
#define NORMAL_PRIORITY 2  
#define HIGH_PRIORITY 3 

/********************************** FUNCTION PROTOTYPES *****************************************/
void nrk_init_nw_stack();
/*
This function initialises the network stack for the nodes. Call this function during node startup

	PARAMS:		None
	RETURNS:		None
	Comments: 	User API
*/

#endif 
